package com.hitqz.robot.api.business.model.vo.tickets;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hitqz.robot.api.business.enums.TicketsStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.util.Date;

/**
 * @author xupkun
 * @date 2024/6/17
 */
@Schema(description = "工单任务")
public class TicketsTaskVo {

    @Schema(description = "任务id")
    private Long id;


    @Schema(description = "任务内容")
    private String content;

    @Schema(description = "0-等待中 1-执行中 2-暂停中 3--停止")
    private int status;

    @Schema(description = "状态描述")
    private String statusStr;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Schema(description = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @Schema(description = "工单结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date finishTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(Date finishTime) {
        this.finishTime = finishTime;
    }

    public String getStatusStr() {
        return TicketsStatusEnum.CMD_TICKETS_STATUS.get(status).getDesc();
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }
}
